[SUBROUTINE]
version = 1.14
icon = probe-down.png
name = _("Probe Surface")
type = probe_surf
help = _("<b>Probe height of material and set value</b>")
order = act hp zdepth fo stop

[PARAM_ACT]
name = _("Active")
icon = enable.png
type = bool
icon = enable.png
value = 1

[PARAM_HP]
name = _("Params")
type = sub-header

[PARAM_ZDEPTH]
name = _("Max depth")
type = float
icon = probe-down.png
tool_tip = _("Maximum depth before stopping")
value = -1.0
metric_value = -25
maximum_value = 0.0
not_allowed = 0
header = hp

[PARAM_FO]
name = _("Final offset")
type = float
icon = dz.png
tool_tip = _("Offset after setting")
value = 1.0
metric_value = 25.0
minimum_value = 0.0
not_allowed = 0
header = hp

[PARAM_STOP]
name = _("End program")
icon = enable.png
type = bool
icon = enable.png
value = 1
header = hp
tool_tip = _("End after reaching position")

[CALL]
content =
	(begin #sub_name)
	(probe z and set author : Fernand Veilleux)
	
	o<#self_id_ena> if [#param_act]
		o<probe> call [0] [0] [#param_zdepth]
		G10 L20 P#5220 Z[#<probe_height>]
		G0 Z[#<probe_height> + #param_fo]
		o<#self_id0> if [#param_stop EQ 1]
			M2
		o<#self_id0> endif
	o<#self_id_ena> endif
	(end #sub_name)
